home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1999 March / EnigmA AMIGA RUN 35 (1999)(G.R. Edizioni)(IT)[!][issue 1999-03].iso / earcd / devel / libx11 / include / x11 / xaw / toggle.h < prev    next >
C/C++ Source or Header  |  1999-01-01  |  5KB  |  176 lines

  1. /*
  2.  * $XConsortium: Toggle.h,v 1.13 91/05/04 18:59:01 rws Exp $
  3.  *
  4.  * Copyright 1989 Massachusetts Institute of Technology
  5.  *
  6.  * Permission to use, copy, modify, distribute, and sell this software and its
  7.  * documentation for any purpose is hereby granted without fee, provided that
  8.  * the above copyright notice appear in all copies and that both that
  9.  * copyright notice and this permission notice appear in supporting
  10.  * documentation, and that the name of M.I.T. not be used in advertising or
  11.  * publicity pertaining to distribution of the software without specific,
  12.  * written prior permission.  M.I.T. makes no representations about the
  13.  * suitability of this software for any purpose.  It is provided "as is"
  14.  * without express or implied warranty.
  15.  *
  16.  * M.I.T. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
  17.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL M.I.T.
  18.  * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  19.  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
  20.  * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 
  21.  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  22.  */
  23.  
  24. /*
  25.  * ToggleP.h - Private definitions for Toggle widget
  26.  *
  27.  * Author: Chris D. Peterson
  28.  *         MIT X Consortium
  29.  *         kit@expo.lcs.mit.edu
  30.  *  
  31.  * Date:   January 12, 1989
  32.  */
  33.  
  34. #ifndef _XawToggle_h
  35. #define _XawToggle_h
  36.  
  37. /***********************************************************************
  38.  *
  39.  * Toggle Widget
  40.  *
  41.  ***********************************************************************/
  42.  
  43. #include <X11/Xaw/Command.h>
  44. #include <X11/Xfuncproto.h>
  45.  
  46. /* Resources:
  47.  
  48.  Name             Class        RepType        Default Value
  49.  ----             -----        -------        -------------
  50.  radioGroup          RadioGroup         Widget          NULL              +
  51.  radioData           RadioData          Pointer         (caddr_t) Widget  ++
  52.  state               State              Boolean         Off
  53.  
  54.  background         Background        Pixel        XtDefaultBackground
  55.  bitmap             Pixmap        Pixmap        None
  56.  border             BorderColor    Pixel        XtDefaultForeground
  57.  borderWidth         BorderWidth    Dimension    1
  58.  callback         Callback        Pointer        NULL
  59.  cursor             Cursor        Cursor        None
  60.  destroyCallback     Callback        Pointer        NULL
  61.  font             Font        XFontStructx*    XtDefaultFont
  62.  foreground         Foreground        Pixel        XtDefaultForeground
  63.  height             Height        Dimension    text height
  64.  highlightThickness  Thickness        Dimension    2
  65.  insensitiveBorder   Insensitive    Pixmap        Gray
  66.  internalHeight         Height        Dimension    2
  67.  internalWidth         Width        Dimension    4
  68.  justify         Justify        XtJustify    XtJustifyCenter
  69.  label             Label        String        NULL
  70.  mappedWhenManaged   MappedWhenManaged    Boolean        True
  71.  resize             Resize        Boolean        True
  72.  sensitive         Sensitive        Boolean        True
  73.  width             Width        Dimension    text width
  74.  x             Position        Position    0
  75.  y             Position        Position    0
  76.  
  77. + To use the toggle as a radio toggle button, set this resource to point to
  78.   any other widget in the radio group.
  79.  
  80. ++ This is the data returned from a call to XtToggleGetCurrent, by default
  81.    this is set to the name of toggle widget.
  82.  
  83. */
  84.  
  85. /*
  86.  * These should be in StringDefs.h but aren't so we will define
  87.  * them here if they are needed.
  88.  */
  89.  
  90.  
  91. #define XtCWidget "Widget"
  92. #define XtCState "State"
  93. #define XtCRadioGroup "RadioGroup"
  94. #define XtCRadioData "RadioData"
  95.  
  96. #ifndef _XtStringDefs_h_
  97. #define XtRWidget "Widget"
  98. #endif
  99.  
  100. #define XtNstate "state"
  101. #define XtNradioGroup "radioGroup"
  102. #define XtNradioData "radioData"
  103.  
  104. extern WidgetClass               toggleWidgetClass;
  105.  
  106. typedef struct _ToggleClassRec   *ToggleWidgetClass;
  107. typedef struct _ToggleRec        *ToggleWidget;
  108.  
  109.  
  110. /************************************************************
  111.  * 
  112.  * Public Functions
  113.  *
  114.  ************************************************************/
  115.  
  116. _XFUNCPROTOBEGIN
  117.    
  118. /*    Function Name: XawToggleChangeRadioGroup
  119.  *    Description: Allows a toggle widget to change radio lists.
  120.  *    Arguments: w - The toggle widget to change lists.
  121.  *                 radio_group - any widget in the new list.
  122.  *    Returns: none.
  123.  */
  124.  
  125. extern void XawToggleChangeRadioGroup(
  126. #if NeedFunctionPrototypes
  127.     Widget        /* w */,
  128.     Widget        /* radio_group */
  129. #endif
  130. );
  131.  
  132. /*    Function Name: XawToggleGetCurrent
  133.  *    Description: Returns the RadioData associated with the toggle
  134.  *                   widget that is currently active in a toggle list.
  135.  *    Arguments: radio_group - any toggle widget in the toggle list.
  136.  *    Returns: The XtNradioData associated with the toggle widget.
  137.  */
  138.  
  139. extern XtPointer XawToggleGetCurrent(
  140. #if NeedFunctionPrototypes
  141.     Widget        /* radio_group */
  142. #endif
  143. );
  144.  
  145. /*    Function Name: XawToggleSetCurrent
  146.  *    Description: Sets the Toggle widget associated with the
  147.  *                   radio_data specified.
  148.  *    Arguments: radio_group - any toggle widget in the toggle list.
  149.  *                 radio_data - radio data of the toggle widget to set.
  150.  *    Returns: none.
  151.  */
  152.  
  153. extern void XawToggleSetCurrent(
  154. #if NeedFunctionPrototypes
  155.     Widget        /* radio_group */,
  156.     XtPointer        /* radio_data */
  157. #endif
  158. );
  159.  
  160. /*    Function Name: XawToggleUnsetCurrent
  161.  *    Description: Unsets all Toggles in the radio_group specified.
  162.  *    Arguments: radio_group - any toggle widget in the toggle list.
  163.  *    Returns: none.
  164.  */
  165.  
  166. extern void XawToggleUnsetCurrent(
  167. #if NeedFunctionPrototypes
  168.     Widget        /* radio_group */
  169. #endif
  170. );
  171.  
  172. _XFUNCPROTOEND
  173.  
  174. #endif /* _XawToggle_h */
  175. /* DON'T ADD STUFF AFTER THIS */
  176.